package com.zyzd.general.module.recyclerview.textfragment;

import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.zyzd.general.entity.local.TextEntity;
import com.zyzd.retrofit.base.BaseRecyclerFragment;

/**
 * Created by lzy on 2018/6/4 0004.
 * description ${文本列表}
 */
public class TextFragment extends BaseRecyclerFragment<TextRecyclerContract.IPresenter, TextAdapter, TextEntity> implements TextRecyclerContract.IView {

    @Override
    public TextAdapter createAdapter() {
        return new TextAdapter(getContext());
    }

    @Override
    protected TextRecyclerContract.IPresenter createPresenter() {
        return new TextRecyclerPresenter();
    }

    public static TextFragment getInstance() {
        return new TextFragment();
    }

    @Override
    public RecyclerView.LayoutManager getLayoutManager() {
        return new GridLayoutManager(getContext(), 2);
    }
}
